From b699d329f76ec8578a03ec9b131e9e03245de3fd Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 23 Mar 2006 10:58:39 +0100 Subject: [PATCH] Fix a Linux bug in the driver core in regards to the bind sysfs driver attribute. I've submitted this to lkml, but it should be included in Xen now for people who will use the pciback late binding capability. Signed-off-by: Ryan Wilson --- patches/linux-2.6.16/device_bind.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patches/linux-2.6.16/device_bind.patch diff --git a/patches/linux-2.6.16/device_bind.patch b/patches/linux-2.6.16/device_bind.patch new file mode 100644 index 0000000000..34bc4edeb0 --- /dev/null +++ b/patches/linux-2.6.16/device_bind.patch @@ -0,0 +1,14 @@ +--- linux-2.6.16/drivers/base/bus.c 2006-03-16 10:50:20.000000000 -0500 ++++ linux-2.6.16/drivers/base/bus.c 2006-03-16 11:02:08.000000000 -0500 +@@ -188,6 +188,11 @@ static ssize_t driver_bind(struct device + up(&dev->sem); + if (dev->parent) + up(&dev->parent->sem); ++ ++ if (err > 0) /* success */ ++ err = count; ++ else if (err == 0) /* driver didn't accept device */ ++ err = -ENODEV; + } + put_device(dev); + put_bus(bus); -- 2.30.2